<?php

namespace App\Http\Api\Controllers;

use App\Exceptions\InvalidRequestException;
use App\Http\Api\Services\LogisticsService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;


class LogisticsController extends Controller
{
    protected $logisticsService;

    public function __construct(LogisticsService $logisticsService)
    {
        $this->logisticsService = $logisticsService;
    }

    public function syncLogistics(){
        $num = $this->logisticsService->syncLogistics();
        return res('ok',$num);
    }

    /*
     * 物流通知
     * */
    public function logisticsNotice(){
        $this->logisticsService->logisticsNotice();
    }

    /*
     * 物流更新导出
     * */
    public function noticeExp(){
        $this->logisticsService->noticeExp();
    }
    /*
      * 物流停滞导出
      * */
    public function stagnationExp(){
        $this->logisticsService->stagnationExp();
    }

    /*
     * 创建物流任务 一天两次
     * */
    public function createLogisticsTask(){
        $res = $this->logisticsService->createLogisticsTask();
        return res('ok',$res);
    }
}
